/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       town_type.cpp

	$Header: /game/town_type.cpp $

	$NoKeywords: $

 ************************************************************************/

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#include "precompiled.h"
#pragma warning( disable: 4786 )

#include "town_type.h"

char const* const k_town_keyword[k_town_type_count] = 
{ "life", "order", "death", "chaos", "nature", "might" };

// ------------------------------------------------------------
// get alignment from string
// ------------------------------------------------------------
t_town_type get_town_type( std::string const& name )
{
	int i;

	for (i = 0; i < k_town_type_count; i++)
		if (stricmp( name.c_str(), k_town_keyword[i] ) == 0)
			return t_town_type(i);
	return k_town_type_count;
}
